package com.ai.spring.common.exception;

import com.ai.spring.common.enums.ResponseCodeEnum;
import lombok.Getter;
import org.springframework.web.multipart.MultipartException;

/**
 * 文件上传错误
 *
 * @author 石头
 * @Date 2019/11/18
 * @Version 1.0
 **/
@Getter
public class FileTypeMultipartException extends MultipartException {
    /**错误码*/
    private Integer code;

    public FileTypeMultipartException(ResponseCodeEnum exceptionEnum){
        super(exceptionEnum.getName());
        this.code = exceptionEnum.getCode();
    }

    public FileTypeMultipartException(Integer code, String msg){
        super(msg);
        this.code = code;
    }
}
